package com.jzo2o.customer.controller.operation;

import com.jzo2o.customer.model.dto.request.AgencyCertificationAuditPageQueryReqDTO;
import com.jzo2o.customer.model.dto.request.WorkerCertificationAuditPageQueryReqDTO;
import com.jzo2o.customer.model.dto.response.AgencyCertificationAuditPageQueryResDTO;
import com.jzo2o.customer.model.dto.response.WorkerCertificationAuditPageQueryResDTO;
import com.jzo2o.customer.service.AgencyCertificationAuditService;
import com.jzo2o.customer.service.WorkerCertificationAuditService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * @author itcast
 */
@RestController("agencyCertificationAuditController")
@RequestMapping("/operation/agency-certification-audit")
@Api(tags = "运营端 - 运营端审核认证机构关接口")
public class AgencyCertificationAuditController {

    @Autowired
    private AgencyCertificationAuditService agencyCertificationAuditService;


    /**
     *  审核服务人员认证分页查询
     * @param dto
     * @return
     */
    @GetMapping("/page")
    @ApiOperation("审核服务人员认证分页查询")
    public AgencyCertificationAuditPageQueryResDTO getPage(AgencyCertificationAuditPageQueryReqDTO dto){
        return agencyCertificationAuditService.getPage(dto);
    }

    /**
     * 审核服务人员认证信息
     * @param id
     * @param certificationStatus
     * @param rejectReason
     */
    @PutMapping("/audit/{id}")
    @ApiOperation("审核服务人员认证信息")
    public void audit(@PathVariable("id") Long id,Integer certificationStatus,String rejectReason){
        agencyCertificationAuditService.audit(id,certificationStatus,rejectReason);
    }
}
